home *** CD-ROM | disk | FTP | other *** search
- //-------------------------------------
- //
- // SuperCode (c) 1996 by T.Kühn
- //
- // Programmiersprache: ANSI-C
- // Projektstart: 27.12.94
- //
- // Modul: Strings
- //
- //-------------------------------------
-
- #include <Struct.h>
-
-
- //-------------------------------------
- UBYTE *StrCopy(UBYTE *dest, UBYTE *src, ULONG max)
- {
- register UBYTE *t1=src;
- register UBYTE *t2=dest;
-
- while(max>0 && t1[0]!=0)
- {
- t2++[0]=t1++[0];
- max--;
- }
- if (max>0) t2[0]=0;
-
- return t2;
- }
- //-------------------------------------
- UBYTE *StrAdd(UBYTE *dest, UBYTE *src, ULONG max)
- {
- LONG len=strlen(dest);
- UBYTE *back=0;
-
- if (len<max)
- {
- back=StrCopy(&dest[len],src,max-len);
- }
- else back=dest+max;
-
- return back;
- }
- //-------------------------------------
-
-